package cola.project.hellojavaee.filter;

import jakarta.servlet.*;
import jakarta.servlet.annotation.WebFilter;
import jakarta.servlet.http.HttpServletRequest;

import java.io.IOException;

@WebFilter("/*")
public class Filter02 implements Filter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        HttpServletRequest req = (HttpServletRequest) request;
        System.out.println("二号 Filter 拦截到了：" + req.getRequestURI());

        chain.doFilter(request,response);
        System.out.println("二号 Filter 处理完："+req.getRequestURI());
    }
}
